package fauxman.DynamicElements;

import java.awt.Point;

import fauxman.InkyStates.ChaseInkyState;
import fauxman.InkyStates.EnteringHouseInkyState;
import fauxman.InkyStates.ScatterInkyState;
import fauxman.model.WorldModel;
import fauxman.states.GhostState;
import fauxman.states.PurgatoryUpState;
import fauxman.utilities.ActionUtil;
import fauxman.utilities.SpriteUtil;

public class InkyGhost extends Ghost{
	public InkyGhost(int conX, int conY, int disX, int disY, int width,
			int height, WorldModel model) {
		super(conX, conY, disX, disY, width, height, model);
		states.add(PurgatoryUpState.getInstance());
		states.getFirst().setAppearance(0, this);
		setCurrentDirection(ActionUtil.NORTH);
		setNextDirection(getCurrentDirection());
		this.lookAhead = new Point(disX, disY - 1); //TODO: maybe change behavior to future ghost vs. lookahead
		//this.setReversalBlock(disX, PurgatoryUpState.getInstance().getTarget(null, this)[1]);
	}

	public String toString(){
		return "IG";
	}
	
	public GhostState getScatterState() {
		return ScatterInkyState.getInstance();
	}
	
	public GhostState getChaseState() {
		return ChaseInkyState.getInstance();
	}
	
	@Override
	public GhostState getEnteringGhostHouseState() {
		return EnteringHouseInkyState.getInstance();
	}
	
	@Override
	public void setNormalAppearance(int appearanceID) {
		setAppearance(SpriteUtil.getInkySprite(appearanceID));
	}
}
